Field
Aspects of the present invention generally relate to a communication apparatus that changes a wireless network that the communication apparatus joins and performs communication.
Description of the Related Art
US 2015/036540 discusses the Neighbor Awareness Networking (NAN) technology enabling a communication apparatus to detect available services (functions) and various types of information at low power consumption.
In NAN, a wireless network (NAN cluster) is formed, and services and various types of information can be detected in the NAN cluster. Further, in a case where a communication apparatus detects a partner apparatus that provides a desired service or desired information, the communication apparatus can perform data communication with the specified partner apparatus. In this way, a user using the communication apparatus can use the desired service provided by the partner apparatus or acquire the desired information.
NAN defines a cluster grade (CG), which indicates the priority of a NAN cluster. In NAN, it is recommended that when a communication apparatus in a NAN cluster detects another NAN cluster having a higher CG, the communication apparatus should switch to the detected NAN cluster having the higher CG.
In this way, a NAN cluster having a lower CG disappears, and the NAN cluster having a higher CG remains, whereby a situation where excessive number of NAN clusters exist can be prevented.
However, in a case where a communication apparatus detects a NAN cluster having a higher CG and switches to the detected NAN cluster while performing data communication with a specified partner apparatus, there arises an issue of a disconnection of the data communication during the data communication.